/*
 * author      : 吴中勤 
 * date        : 2018/8/22
 * description : TODO
 */

package com.deepexi.adapter.sdk.sap.dto.callback;

import com.deepexi.adapter.common.BaseDto;
import com.google.gson.annotations.SerializedName;

public class SapCallbackRequest extends BaseDto {
//    SYSID	    系统标识	    String		0..1	IFS
//    USER	    用户	        String		0..1	无则为空
//    KEYNUM	唯一编号	    String		0..1	传出参数的唯一编号返回即可
//    STATUS	状态	        String		0..1	S:成功，E:失败
//    MESSAGE	描述信息	    String		0..1

    public static SapCallbackRequest unHappy(String keyNum, String errMsg) {
        SapCallbackRequest request = new SapCallbackRequest();
        request.setKeyNum(keyNum);
        request.setStatus("E");
        request.setMessage(errMsg);
        return request;
    }

    public static SapCallbackRequest allOk(String keyNum) {
        SapCallbackRequest request = new SapCallbackRequest();
        request.setKeyNum(keyNum);
        request.setStatus("S");
        return request;
    }

    @SerializedName("SYSID")
    private String sysId = "DTC";

    @SerializedName("USER")
    private String user = "";

    @SerializedName("KEYNUM")
    private String keyNum;

    @SerializedName("STATUS")
    private String status = "S";

    @SerializedName("MESSAGE")
    private String message = "";

    public String getSysId() {
        return sysId;
    }

    public void setSysId(String sysId) {
        this.sysId = sysId;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getKeyNum() {
        return keyNum;
    }

    public void setKeyNum(String keyNum) {
        this.keyNum = keyNum;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
